Imports Microsoft.MSDN.Samples.UserControls

Public Class frmTestControl
    Private Sub frmTestControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'ThietBiDataSet.THIETBI' table. You can move, or remove it, as needed.
        'Me.THIETBITableAdapter.Fill(Me.ThietBiDataSet.THIETBI)
        Dim dsThietBi As New DataSet("ThietBi")
        'Dim dvThietBi As DataView

        dsThietBi = MITI.BaseDB.ExecSql_DataSet("select * from THIETBI")
        'dvThietBi = dsThietBi.Tables("THIETBI").DefaultView
        'dvThietBi = Me.ThietBiDataSet.THIETBI
        With ucTreeView1
            .ValueMember = "MATHIETBI"
            .DisplayMember = "TENTHIETBI"
            .CuoiMember = "CUOI"
            .GroupLength = 2
            .DataSource = dsThietBi.Tables(0).DefaultView 'Me.ThietBiDataSet.THIETBI.DefaultView
            .GroupFormat(-1, -1)
            .GroupingChanged()
        End With
    End Sub

End Class